package com.prjsystem.dao.impl;

import java.util.List;

import com.prjsystem.common.constant.CMSConstant;
import com.prjsystem.common.constant.SQLConstant;
import com.prjsystem.dao.BaseDao;
import com.prjsystem.dao.CommonDao;
import com.prjsystem.entity.SelectListBean;

public class CommonDaoImpl extends BaseDao implements CommonDao {

	@SuppressWarnings("unchecked")
	@Override
	public SelectListBean dropDowmList(List<String> dpTypeList) {
		SelectListBean selectListBean = new SelectListBean();
		if (dpTypeList != null && dpTypeList.size() > 0) {
			if (dpTypeList.contains(CMSConstant.DP_TYPE_REQUEST_TYPE)) {
				selectListBean.setTypeList(excuteQueryForstring(SQLConstant.DP_TYPE_REQUEST_TYPE));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_CATEGORY)) {
				selectListBean.setCategoryList(excuteQueryForstring(SQLConstant.DP_TYPE_CATEGORY));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_RLEVEL)) {
				selectListBean.setLevelList(excuteQueryForstring(SQLConstant.DP_TYPE_RLEVEL));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_PRIORITY)) {
				selectListBean.setPriorityList(excuteQueryForstring(SQLConstant.DP_TYPE_PRIORITY));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_STATUS)) {
				selectListBean.setStatusList(excuteQueryForstring(SQLConstant.DP_TYPE_STATUS));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_TODO)) {
				selectListBean.setTodoList(excuteQueryForstring(SQLConstant.DP_TYPE_TODO));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_WORKTYPE)) {
				selectListBean.setWorkTypeList(excuteQueryForstring(SQLConstant.DP_TYPE_WORKTYPE));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_GETALLUSER)) {
				selectListBean.setAllUserName(excuteQueryForstring(SQLConstant.DP_TYPE_GETALLUSER));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_CDCREVIEWER)) {
				selectListBean.setCdcReviewer(excuteQueryForstring(SQLConstant.DP_TYPE_CDCREVIEWER));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_TOKYOREVIEWER)) {
				selectListBean.setTokyoReviewer(excuteQueryForstring(SQLConstant.DP_TYPE_TOKYOREVIEWER));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_TEAMNAME)) {
				selectListBean.setTeamName(excuteQueryForstring(SQLConstant.DP_TYPE_TEAMNAME));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_APPNAME)) {
				selectListBean.setAppNameList(excuteQueryForstring(SQLConstant.DP_TYPE_APPNAME));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_CVSTYPE)) {
				selectListBean.setCvsTypeList(excuteQueryForstring(SQLConstant.DP_TYPE_CVSTYPE));
			}
			if (dpTypeList.contains(CMSConstant.DP_TYPE_NEWSCATE)) {
				selectListBean.setNewsCateList(excuteQueryForstring(SQLConstant.DP_TYPE_NEWSCATE));
			}
		}
		return selectListBean;
	}
}
